﻿Imports System.Data.SqlClient
Public Class ChitietSV

    Private _p1 As String

    Sub New(ByVal p1 As String)
        ' TODO: Complete member initialization 
        _p1 = p1
    End Sub

    Private Sub button4_Click(sender As System.Object, e As System.EventArgs) Handles button4.Click
        Me.Close()
        'Dim frm As SuaDSSinhVien = New SuaDSSinhVien(SinhVien_ID)
        'frm.Show()
    End Sub

    Private Sub button3_Click(sender As System.Object, e As System.EventArgs) Handles button3.Click
        Dim con As SqlConnection = New SqlConnection()
        con.ConnectionString = Ketnoi.str
        con.Open()
        Dim cmd1 As SqlCommand = New SqlCommand()
        Dim cmd2 As SqlCommand = New SqlCommand()
        cmd1.Connection = con
        cmd2.Connection = con
        'cmd1.CommandText = "DELETE FROM KetQua Where ID_SinhVien='" + SinhVien_ID + "'"
        'cmd2.CommandText = "DELETE FROM SinhVien Where SinhVien_ID='" + SinhVien_ID + "'"
        Dim result As DialogResult
        result = MessageBox.Show("BẠN CÓ MUỐN THAY XÓA THÔNG TIN KHÔNG?", "THÔNG BÁO", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
        If result = DialogResult.Yes Then
            cmd1.ExecuteNonQuery()
            cmd2.ExecuteNonQuery()
            MessageBox.Show("XÓA THÀNH CÔNG", "THÔNG BÁO")
        End If
        con.Close()
        Me.Close()
        Dim frm As TimKiemSinhVien = New TimKiemSinhVien()
        frm.Show()
    End Sub

    Private Sub button2_Click(sender As System.Object, e As System.EventArgs) Handles button2.Click
        Me.Close()
    End Sub

    Private Sub button1_Click(sender As System.Object, e As System.EventArgs) Handles button1.Click
        ' Dim frm As KetQuaHocTap = New KetQuaHocTap(SinhVien_ID)
        'frm.Show()
    End Sub
End Class